package org.budo.warehouse.logic.api;

/**
 * @author lmw
 */
public abstract class AbstractDataEntry implements DataEntry {
    @Override
    public Boolean hasColumn(Integer rowIndex, String columnName) {
        Integer columnCount = this.getColumnCount(rowIndex);

        for (int columnIndex = 0; columnIndex < columnCount; columnIndex++) {
            String column = this.getColumnName(rowIndex, columnIndex);
            if (null != columnName && null != column //
                    && columnName.equals(column)) {
                return true;
            }
        }

        return false;
    }
}